package com.example.demo.controller;

import com.example.demo.mapper.economicanalysisMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("economicanalysis")
@CrossOrigin
@Api(value = "经济型分析")
public class EconomicanalysisController {
    @Resource
    economicanalysisMapper economicanalysisMapper;
    @PostMapping("/totalprice")
    @ApiOperation(value = "年总消费额",notes = "某年购买新件和返修件的总花费")
    public void year_total_price(int year1){//输入储存过程所需参数

         Map<String,Object> params=new HashMap<>();
         params.put("year1",year1);

         economicanalysisMapper.total_year_price(params);


    }

}
